package sjtu.ist.warehouse4ws.service.cust;

import java.util.List;

import sjtu.ist.warehouse4ws.dao.cust.CustResourceDao;
import sjtu.ist.warehouse4ws.model.CustResource;

public class CustResourceServiceImpl implements CustResourceService{
	private CustResourceDao custResourceDao;


	public void setCustResourceDao(CustResourceDao resourceDao) {
		this.custResourceDao = resourceDao;
	}


	@Override
	public boolean addCustResource(CustResource resource) {
		
		this.custResourceDao.save(resource);
		// TODO Auto-generated method stub
		return false;
	}


	@Override
	public List<CustResource> getCustResourceById(String id) {
		// TODO Auto-generated method stub
		return (List<CustResource>)custResourceDao.findCustResourceById(id);
	}


	@Override
	public List<CustResource> getCustResourceByGroupId(String groupId) {
		// TODO Auto-generated method stub
		return custResourceDao.findCustResourceByGroupId(groupId);
	}

}
